<?php

class S_Input extends CI_Input {
	
	/*
	 * 修复这个cookie的bug，当config.php中提供$config['cookie_prefix']时
	 */
	function cookie($index = '', $xss_clean = FALSE)
	{
		if (isset($_COOKIE[$index]))
		{
			return $this->_fetch_from_array($_COOKIE, $index, $xss_clean);
		}
		else
		{
			return $this->_fetch_from_array($_COOKIE, config_item('cookie_prefix').$index, $xss_clean);
		}
	}
	
}